package ldh.im.fxgui.pojo;

import com.jfoenix.controls.JFXButton;
import ldh.im.fxbase.data.dto.SearchResult;

public class WrapSearchResult {

    private SearchResult searchResult;
    private String title;
    private JFXButton jfxButton;
    private String search;

    public WrapSearchResult(String search, JFXButton jfxButton) {
        this.search = search;
        this.jfxButton = jfxButton;
    }

    public WrapSearchResult(String search, String title) {
        this.search = search;
        this.title = title;
    }

    public WrapSearchResult(String search, SearchResult searchResult) {
        this.search = search;
        this.searchResult = searchResult;
    }

    public boolean isTitle(){
        return title != null;
    }

    public boolean isButton() {
        return jfxButton != null;
    }

    public boolean isContent() {
        return searchResult != null;
    }

    public SearchResult getSearchResult() {
        return searchResult;
    }

    public void setSearchResult(SearchResult searchResult) {
        this.searchResult = searchResult;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public JFXButton getJfxButton() {
        return jfxButton;
    }

    public void setJfxButton(JFXButton jfxButton) {
        this.jfxButton = jfxButton;
    }

    public String getSearch() {
        return search;
    }

    public void setSearch(String search) {
        this.search = search;
    }
}
